﻿#pragma once

#include <QWidget>
#include "ui_ScreenshotWindow.h"
#include <QTimer>
#include "Context/VideoProgram.h"
#include "Screenshot/Screenshot.h"
#include "Screenshot/VideoDXGICaptor.h"

class ScreenshotWindow : public QWidget
{
    Q_OBJECT

public:
    ScreenshotWindow(QWidget *parent = Q_NULLPTR);
    ~ScreenshotWindow();

protected:
    void closeEvent(QCloseEvent* e);

private slots:
    // 帧渲染事件
    void onTimer();

    void on_list_clicked();
    void itemClicked(class ShareItemView* inItem);
    void on_start_clicked();
    void on_end_clicked();

private:
    Ui::ScreenshotWindow ui;

    // 定时器
    QTimer* _timer;

    // 截图
    DibCaptureHelper* _captureHelper;
    VideoDXGICaptor* _captorDirect;

    // 视频控件
    VideoProgram* _videoProgram;
};
